import 'package:ditieapp/page/provider/LoginProvider.dart';
import 'package:ditieapp/page/xcm/xcm.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'dart:async';

import 'package:provider/provider.dart';
//姓名,手机号,你想去过哪里

class YkmPage extends StatefulWidget {
  @override
  _YkmPageState createState() => _YkmPageState();
}

class _YkmPageState extends State<YkmPage> {
  late ScrollController _controller =
      ScrollController(initialScrollOffset: 300);

  late ScrollController _controller1;

  double count = 1;

  bool start = true;

  bool leneraStart = false;

  bool cityStart = false;

  List<Map> imageMap = [
    {"id": 1, "url": "lib/assets/icon/sw1.png"},
    {"id": 2, "url": "lib/assets/icon/sw2.png"},
    {"id": 3, "url": "lib/assets/icon/sw3.png"},
  ];

  @override
  void initState() {
    // TODO: implement initState
    super.initState();

    _controller.addListener(() {
      print(_controller.offset.toString());
    });
    getListener();

    _controller1 = ScrollController(initialScrollOffset: 0);
    // getListener2();
  }

  void getListener2() {
    _controller1.addListener(() {
      print(_controller1.offset.toString());
      if (_controller1.offset.toInt() > 100) {
        setState(() {
          leneraStart = true;
        });
      } else if (_controller1.offset.toInt() < 10) {
        leneraStart = false;
      }
    });
  }

  void getListener() {
    const timeout = const Duration(seconds: 1);
    Timer.periodic(timeout, (timer) {
      //callback function
      //1s 回调一次
      // print('afterTimer='+DateTime.now().toString());
      setState(() {
        count += 1;
      });
      print(count);
      if (count < 20) {
        _controller.animateTo(2000,
            duration: Duration(seconds: 30), curve: Curves.linear);
      } else {
        // _controller.animateTo(300,duration: Duration(seconds: 1),curve: Curves.linear);
        _controller.jumpTo(300);
        setState(() {
          count = 1;
        });
      }

      //print(count.toString());
    });
  }

  @override
  void dispose() {
    // TODO: implement dispose
    super.dispose();
    _controller.dispose();
    _controller1.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: MediaQuery.removePadding(
        removeTop: true,
        context: context,
        child: Stack(
          children: [
            ListView(
              controller: _controller1, //
              shrinkWrap: true,
              children: [
                Container(
                  width: MediaQuery.of(context).size.width,
                  height: 900,
                  // decoration: BoxDecoration(
                  //   gradient: LinearGradient(
                  //     //渐变位置
                  //     begin: Alignment.topRight, //右上
                  //     end: Alignment.bottomLeft, //左下
                  //     stops: [0.0, 1.0, 1.0], //[渐变起始点, 渐变结束点]
                  //     //渐变颜色[始点颜色, 结束颜色]
                  //     colors: [
                  //       //Color.fromRGBO(0, 201, 87, 1),
                  //       //Colors.yellow,
                  //       Color.fromRGBO(87, 187, 114, 0),
                  //       Colors.white,
                  //       Colors.white,
                  //     ],
                  //   ),
                  // ),
                  child: Stack(
                    children: [
                      Positioned(
                        top: 0,
                        child: Container(
                            width: MediaQuery.of(context).size.width,
                            height: 600,
                            child: Padding(
                              padding: EdgeInsets.only(
                                  left: 0, top: 0, bottom: 0, right: 0),
                              child: Scrollbar(
                                showTrackOnHover: false,
                                child: ListView(
                                  shrinkWrap: true,
                                  physics: NeverScrollableScrollPhysics(),
                                  controller: _controller,
                                  children: [
                                    // Container(
                                    //   width: MediaQuery.of(context).size.width,
                                    //   height: 100,
                                    // ),
                                    Padding(
                                      padding: EdgeInsets.only(
                                          left: 0,
                                          top: 0,
                                          bottom: 400,
                                          right: 0),
                                      child: Container(
                                        child: Image(
                                          image: AssetImage(
                                              "lib/assets/ykm/bl2.png"),
                                          fit: BoxFit.cover,
                                        ),
                                      ),
                                    )
                                  ],
                                ),
                              ),
                            )),
                      ),
                      Positioned(
                        top: 0,
                        child: Container(
                          height: MediaQuery.of(context).size.height,
                          width: MediaQuery.of(context).size.width,
                          decoration: BoxDecoration(
                            gradient: LinearGradient(
                                //渐变位置
                                begin: Alignment.topRight, //右上
                                end: Alignment.bottomLeft, //左下
                                stops: [
                                  0.0,
                                  1.0,
                                  1.0
                                ], //[渐变起始点, 渐变结束点]
                                //渐变颜色[始点颜色, 结束颜色]
                                colors: [
                                  //Color.fromRGBO(0, 201, 87, 1),
                                  //Colors.yellow,
                                  Color.fromRGBO(87, 187, 114, 0),
                                  Color.fromRGBO(255, 255, 255, 1),
                                  Colors.white,
                                ]),
                          ),
                        ),
                      ),
                      Positioned(
                        top: 90,
                        child: Padding(
                          padding: EdgeInsets.only(
                            left: 22,
                            right: 10,
                          ),
                          child: Stack(
                            children: [
                              Container(
                                width: MediaQuery.of(context).size.width,
                                height: 380,
                                //color: Colors.orange,
                                child: Padding(
                                  padding: EdgeInsets.only(right: 43),
                                  child: Container(
                                    height: 380,
                                    width: MediaQuery.of(context).size.width,
                                    decoration: BoxDecoration(
                                        color: Colors.white,
                                        borderRadius: BorderRadius.circular(10),
                                        image: DecorationImage(
                                            image: AssetImage(
                                                "lib/assets/ykm/bjj.png"),
                                            fit: BoxFit.fill)),
                                    child: Column(
                                      children: [
                                        Container(
                                          width:
                                              MediaQuery.of(context).size.width,
                                          height: 50,
                                          //color: Colors.green,
                                          child: Row(
                                            mainAxisAlignment:
                                                MainAxisAlignment.spaceAround,
                                            children: [
                                              Container(
                                                width: 60,
                                                height: 30,
                                                //color: Colors.blueAccent,
                                                child: Row(
                                                  mainAxisAlignment:
                                                      MainAxisAlignment.center,
                                                  children: [
                                                    Text(
                                                      "深圳",
                                                      style: TextStyle(
                                                          fontSize: 18,
                                                          fontWeight:
                                                              FontWeight.w500),
                                                    ),
                                                    Container(
                                                      width: 14,
                                                      height: 14,
                                                      child: Image.asset(
                                                          "lib/assets/ykm/bottom.png"),
                                                    )
                                                  ],
                                                ),
                                              ),
                                              Container(
                                                width: 120,
                                                height: 30,
                                                alignment: Alignment.center,
                                                decoration: BoxDecoration(
                                                    color: Color.fromRGBO(
                                                        236, 242, 255, 1),
                                                    borderRadius:
                                                        BorderRadius.circular(
                                                            5)),
                                                child: Row(
                                                  mainAxisAlignment:
                                                      MainAxisAlignment.center,
                                                  children: [
                                                    SizedBox(
                                                      width: 10,
                                                    ),
                                                    Container(
                                                      width: 55,
                                                      height: 30,
                                                      child: Row(
                                                        children: [
                                                          Text(
                                                            "" +
                                                                context
                                                                    .read<
                                                                        LoginProvider>()
                                                                    .getNames()
                                                                    .toString()
                                                                    .substring(
                                                                        0, 1) +
                                                                "*" +
                                                                context
                                                                    .read<
                                                                        LoginProvider>()
                                                                    .getNames()
                                                                    .toString()
                                                                    .substring(
                                                                        2, 3),
                                                            style: TextStyle(
                                                                fontSize: 16,
                                                                fontWeight:
                                                                    FontWeight
                                                                        .w500),
                                                          ),
                                                          Container(
                                                            width: 10,
                                                            height: 10,
                                                            child: Image.asset(
                                                                "lib/assets/ykm/bottom.png"),
                                                          )
                                                        ],
                                                      ),
                                                    ),
                                                    Container(
                                                      width: 50,
                                                      height: 30,
                                                      child: Row(
                                                        children: [
                                                          Text(
                                                            " | 管理",
                                                            style: TextStyle(
                                                                fontSize: 16,
                                                                color: Color
                                                                    .fromRGBO(
                                                                        50,
                                                                        102,
                                                                        188,
                                                                        1)),
                                                          )
                                                        ],
                                                      ),
                                                    ),
                                                  ],
                                                ),
                                              ),
                                              Container(
                                                width: 70,
                                                height: 30,
                                                //color: Colors.orange,
                                                child: Row(
                                                  mainAxisAlignment:
                                                      MainAxisAlignment.center,
                                                  children: [
                                                    Container(
                                                      width: 18,
                                                      height: 18,
                                                      child: Image.asset(
                                                        "lib/assets/ykm/audio.png",
                                                        fit: BoxFit.fill,
                                                      ),
                                                    ),
                                                    Container(
                                                      width: 3,
                                                    ),
                                                    Text(
                                                      "播报",
                                                      style: TextStyle(
                                                          color: Color.fromRGBO(
                                                              74, 137, 255, 1),
                                                          fontSize: 18),
                                                    ),
                                                  ],
                                                ),
                                              )
                                            ],
                                          ),
                                        ),
                                        Container(
                                          alignment: Alignment.center,
                                          width:
                                              MediaQuery.of(context).size.width,
                                          height: 40,
                                          //color: Colors.orange,
                                          child: Text(
                                            "" +
                                                DateTime.now()
                                                    .toString()
                                                    .substring(5, 19),
                                            style: TextStyle(
                                                fontSize: 28,
                                                fontWeight: FontWeight.w700),
                                          ),
                                        ),
                                        Padding(
                                          padding: EdgeInsets.only(top: 26),
                                          child: Container(
                                            width: 169,
                                            height: 169,
                                            // child: Image.asset(
                                            //   "lib/assets/ykm/eweima002.png",
                                            //   fit: BoxFit.fill,
                                            // ),
                                          ),
                                        ),
                                        Container(
                                          width:
                                              MediaQuery.of(context).size.width,
                                          height: 60,
                                          alignment: Alignment.center,
                                          child: Text(
                                            "绿码",
                                            style: TextStyle(
                                                fontSize: 18,
                                                color: Colors.green),
                                          ),
                                        ),
                                        Container(
                                          width:
                                              MediaQuery.of(context).size.width,
                                          height: 20,
                                          child: Row(
                                            mainAxisAlignment:
                                                MainAxisAlignment.spaceAround,
                                            children: [
                                              Container(
                                                width: 110,
                                                height: 30,
                                                //color: Colors.orange,
                                                child: Row(
                                                  mainAxisAlignment:
                                                      MainAxisAlignment.center,
                                                  children: [
                                                    Container(
                                                      width: 20,
                                                    ),
                                                    Container(
                                                      width: 14,
                                                      height: 14,
                                                      child: Image.asset(
                                                          "lib/assets/ykm/orderlist.png"),
                                                    ),
                                                    Text(
                                                      " 健康信息",
                                                      style: TextStyle(
                                                          fontSize: 16,
                                                          fontWeight:
                                                              FontWeight.w500),
                                                    ),
                                                  ],
                                                ),
                                              ),
                                              InkWell(
                                                onTap: () {
                                                  print("...点击行程卡...");

                                                  showModalBottomSheet(
                                                      backgroundColor:
                                                          Color.fromRGBO(
                                                              1, 1, 1, 0),
                                                      //barrierColor: Color.fromRGBO(100, 100, 100, 1),//
                                                      context: context,
                                                      isScrollControlled: true,
                                                      elevation: 10,
                                                      shape:
                                                          RoundedRectangleBorder(
                                                              borderRadius:
                                                                  BorderRadius
                                                                      .only(
                                                        topLeft:
                                                            Radius.circular(15),
                                                        topRight:
                                                            Radius.circular(15),
                                                        bottomLeft:
                                                            Radius.circular(0),
                                                        bottomRight:
                                                            Radius.circular(0),
                                                      )),
                                                      builder: (BuildContext
                                                          context) {
                                                        return Container(
                                                          alignment: Alignment
                                                              .bottomCenter,
                                                          //color: Colors.yellow,
                                                          height: MediaQuery.of(
                                                                      context)
                                                                  .size
                                                                  .height -
                                                              110,
                                                          child: Column(
                                                            mainAxisAlignment:
                                                                MainAxisAlignment
                                                                    .start,
                                                            children: [
                                                              Padding(
                                                                padding: EdgeInsets
                                                                    .only(
                                                                        left:
                                                                            10,
                                                                        right:
                                                                            10),
                                                                child:
                                                                    Container(
                                                                  alignment:
                                                                      Alignment
                                                                          .bottomCenter,
                                                                  height: 35,
                                                                  width: MediaQuery.of(
                                                                          context)
                                                                      .size
                                                                      .width,
                                                                  child: Row(
                                                                    mainAxisAlignment:
                                                                        MainAxisAlignment
                                                                            .spaceBetween,
                                                                    children: [
                                                                      Container(
                                                                        width:
                                                                            180,
                                                                        height:
                                                                            45,
                                                                        child:
                                                                            Row(
                                                                          mainAxisAlignment:
                                                                              MainAxisAlignment.start,
                                                                          children: [
                                                                            Container(
                                                                              alignment: Alignment.center,
                                                                              width: 20,
                                                                              height: 20,
                                                                              decoration: BoxDecoration(borderRadius: BorderRadius.circular(20), color: Colors.white),
                                                                              child: Padding(
                                                                                padding: EdgeInsets.all(3),
                                                                                child: Container(
                                                                                  width: 14,
                                                                                  height: 14,
                                                                                  decoration: BoxDecoration(borderRadius: BorderRadius.circular(14), border: Border.all(width: 1), image: DecorationImage(image: AssetImage("lib/assets/ykm/jt2.png"))),
                                                                                ),
                                                                              ),
                                                                            ),
                                                                            Container(
                                                                              child: Text(
                                                                                " 通信行程卡 提供服务 >",
                                                                                style: TextStyle(color: Colors.white),
                                                                              ),
                                                                            ),
                                                                          ],
                                                                        ),
                                                                      ),
                                                                      InkWell(
                                                                        onTap:
                                                                            () {},
                                                                        child:
                                                                            Padding(
                                                                          padding:
                                                                              EdgeInsets.only(bottom: 5),
                                                                          child:
                                                                              Container(
                                                                            alignment:
                                                                                Alignment.center,
                                                                            width:
                                                                                18,
                                                                            height:
                                                                                18,
                                                                            decoration:
                                                                                BoxDecoration(
                                                                              color: Color.fromRGBO(69, 73, 74, 0.5),
                                                                              borderRadius: BorderRadius.circular(16),
                                                                            ),
                                                                            child:
                                                                                Container(
                                                                              width: 14,
                                                                              height: 14,
                                                                              child: Image.asset(
                                                                                "lib/assets/ykm/xxx.png",
                                                                                fit: BoxFit.fill,
                                                                              ),
                                                                            ),
                                                                          ),
                                                                        ),
                                                                      )
                                                                    ],
                                                                  ),
                                                                ),
                                                              ),
                                                              Stack(
                                                                children: [
                                                                  Container(
                                                                    height: 585,
                                                                    width: MediaQuery.of(
                                                                            context)
                                                                        .size
                                                                        .width,
                                                                    child:
                                                                        Column(
                                                                      mainAxisAlignment:
                                                                          MainAxisAlignment
                                                                              .center,
                                                                      children: [
                                                                        Container(
                                                                          width: MediaQuery.of(context)
                                                                              .size
                                                                              .width,
                                                                          height:
                                                                              45,
                                                                          decoration: BoxDecoration(
                                                                              color: Colors.white,
                                                                              borderRadius: BorderRadius.only(
                                                                                topLeft: Radius.circular(15),
                                                                                topRight: Radius.circular(15),
                                                                                bottomLeft: Radius.circular(0),
                                                                                bottomRight: Radius.circular(0),
                                                                              )),
                                                                          alignment:
                                                                              Alignment.center,
                                                                          child:
                                                                              Text(
                                                                            "通信行程卡",
                                                                            style:
                                                                                TextStyle(fontSize: 18, fontWeight: FontWeight.w600),
                                                                          ),
                                                                        ),
                                                                        XcmPage()
                                                                        // CityPage()
                                                                      ],
                                                                    ),
                                                                  ),
                                                                ],
                                                              ),
                                                            ],
                                                          ),
                                                        );
                                                      });
                                                },
                                                child: Container(
                                                  width: 100,
                                                  height: 30,
                                                  //color: Colors.orange,
                                                  child: Row(
                                                    children: [
                                                      Container(
                                                        width: 29,
                                                      ),
                                                      Container(
                                                        width: 12,
                                                        height: 12,
                                                        decoration: BoxDecoration(
                                                            color:
                                                                Color.fromRGBO(
                                                                    73,
                                                                    137,
                                                                    249,
                                                                    1),
                                                            borderRadius:
                                                                BorderRadius
                                                                    .circular(
                                                                        12)),
                                                        child: Container(
                                                          width: 10,
                                                          height: 10,
                                                          child: Image.asset(
                                                              "lib/assets/ykm/jt.png"),
                                                        ),
                                                      ),
                                                      Text(
                                                        " 行程卡",
                                                        style: TextStyle(
                                                            fontSize: 18,
                                                            color:
                                                                Color.fromRGBO(
                                                                    73,
                                                                    137,
                                                                    249,
                                                                    1),
                                                            fontWeight:
                                                                FontWeight
                                                                    .w500),
                                                      ),
                                                    ],
                                                  ),
                                                ),
                                              ),
                                            ],
                                          ),
                                        )
                                      ],
                                    ),
                                  ),
                                ),
                              ),
                              Positioned(
                                top: 153,
                                right: 44,
                                child: Container(
                                  alignment: Alignment.center,
                                  height: 100,
                                  width: 30,
                                  decoration: BoxDecoration(
                                    color: Color.fromRGBO(242, 242, 242, 1),
                                    borderRadius: BorderRadius.only(
                                      topLeft: Radius.circular(10),
                                      topRight: Radius.circular(0),
                                      bottomLeft: Radius.circular(10),
                                      bottomRight: Radius.circular(0),
                                    ),
                                  ),
                                  child: Padding(
                                      padding:
                                          EdgeInsets.only(left: 3, right: 3),
                                      child: Text(
                                        "常见问题",
                                        style: TextStyle(
                                            fontSize: 15,
                                            color: Color.fromRGBO(
                                                131, 131, 131, 1)),
                                        textAlign: TextAlign.center,
                                      )),
                                ),
                              ),
                            ],
                          ),
                        ),
                      ),
                      Positioned(
                        top: 40,
                        left: 20,
                        child: Container(
                          child: Text(
                            "<",
                            style: TextStyle(fontSize: 22, color: Colors.white),
                          ),
                        ),
                      ),
                      Positioned(
                        top: 40,
                        left: 140,
                        child: Container(
                          child: Text(
                            "粤康码",
                            style: TextStyle(fontSize: 20, color: Colors.white),
                          ),
                        ),
                      ),
                      Positioned(
                          top: 190,
                          left: 95,
                          child: Container(
                            //width: 214,//
                            //height: 200,
                            width: 214, //
                            height: 200,
                            // child: Image.asset(
                            //   "lib/assets/ykm/eweima002.png",
                            //   fit: BoxFit.fill,
                            // ),
                          )),

                      // Positioned(
                      //   top: 480,
                      //   left: 20,
                      //   child: Padding(
                      //     padding: EdgeInsets.only(left: 0, right: 0),
                      //     child: Container(
                      //       alignment: Alignment.center,
                      //       width: 320,
                      //       height: 116,
                      //       decoration: BoxDecoration(
                      //           borderRadius: BorderRadius.circular(15),
                      //           image: DecorationImage(
                      //               image: AssetImage(
                      //                   "lib/assets/icon/12312512.png"),
                      //               fit: BoxFit.none)),
                      //       //color: Colors.orange,
                      //     ),
                      //   ),
                      // ),
                      Positioned(
                        top: 478,
                        child: Container(
                          width: MediaQuery.of(context).size.width,
                          height: 120,
                          decoration: BoxDecoration(),
                          //color: Colors.yellow,
                          child: Row(
                            mainAxisAlignment: MainAxisAlignment.center,
                            children: [
                              Container(
                                width: 158,
                                height: 110,
                                decoration: BoxDecoration(
                                  borderRadius: BorderRadius.only(
                                    topLeft: Radius.circular(15),
                                    topRight: Radius.circular(0),
                                    bottomLeft: Radius.circular(15),
                                    bottomRight: Radius.circular(0),
                                  ),
                                  // border: Border(
                                  //   top: BorderSide(width: 3.0, color: Colors.white),
                                  //   left: BorderSide(width: 3.0, color: Colors.white),
                                  //   right: BorderSide(width: 0.0, color: Colors.teal),
                                  //   bottom: BorderSide(width: 3.0, color: Colors.white),
                                  // ),
                                  gradient: LinearGradient(
                                      //渐变位置
                                      begin: Alignment.topCenter, //右上
                                      end: Alignment.bottomCenter, //左下
                                      stops: [
                                        0.0,
                                        1.0,
                                      ], //[渐变起始点, 渐变结束点]
                                      //渐变颜色[始点颜色, 结束颜色]
                                      colors: [
                                        //Color.fromRGBO(0, 201, 87, 1),
                                        //Colors.yellow,
                                        Color.fromRGBO(51, 134, 253, 1),
                                        Color.fromRGBO(25, 67, 216, 1),
                                      ]),
                                ),
                                child: Column(
                                  mainAxisAlignment: MainAxisAlignment.center,
                                  children: [
                                    Container(
                                      width: 150,
                                      height: 20,
                                      //color: Colors.orange,
                                      child: Row(
                                        mainAxisAlignment:
                                            MainAxisAlignment.center,
                                        children: [
                                          Container(
                                            width: 16,
                                            height: 16,
                                            child: Image.asset(
                                                "lib/assets/ykm/success.png"),
                                          ),
                                          Text(
                                            " 核酸检测 >  ",
                                            style: TextStyle(
                                              color: Color.fromRGBO(
                                                  255, 253, 236, 1),
                                            ),
                                          ),
                                          Container(
                                            decoration: BoxDecoration(
                                                color: Color.fromRGBO(
                                                    77, 158, 249, 1),
                                                borderRadius:
                                                    BorderRadius.circular(2)),
                                            width: 40,
                                            height: 16,
                                            alignment: Alignment.center,
                                            child: Text(
                                              "查省外",
                                              style: TextStyle(
                                                  fontSize: 10,
                                                  color: Colors.white),
                                            ),
                                          )
                                        ],
                                      ),
                                    ),
                                    Padding(
                                      padding: EdgeInsets.only(right: 10),
                                      child: Container(
                                        width: 100,
                                        height: 60,
                                        //color: Colors.green,
                                        child: Row(
                                          mainAxisAlignment:
                                              MainAxisAlignment.center,
                                          children: [
                                            Container(
                                              width: 60,
                                              height: 60,
                                              child: Image.asset(
                                                  "lib/assets/icon/25.png"),
                                            ),
                                            Column(
                                              mainAxisAlignment:
                                                  MainAxisAlignment.center,
                                              children: [
                                                Text(
                                                  "小时",
                                                  style: TextStyle(
                                                      color: Color.fromRGBO(
                                                          255, 253, 236, 1),
                                                      fontWeight:
                                                          FontWeight.w600),
                                                ),
                                                Container(
                                                  height: 5,
                                                ),
                                                Text(
                                                  "阴性",
                                                  style: TextStyle(
                                                      color: Color.fromRGBO(
                                                          255, 253, 236, 1),
                                                      fontWeight:
                                                          FontWeight.w600),
                                                )
                                              ],
                                            )
                                          ],
                                        ),
                                      ),
                                    ),
                                    Text(
                                      "" +
                                          DateTime.now().year.toString() +
                                          "-" +
                                          DateTime.now().month.toString() +
                                          "-" +
                                          (DateTime.now().day).toString() +
                                          " " +
                                          "01:10:28",
                                      style: TextStyle(
                                        fontSize: 13,
                                        color: Color.fromRGBO(255, 253, 236, 1),
                                      ),
                                    )
                                  ],
                                ),
                              ),
                              Container(
                                width: 158,
                                height: 110,
                                decoration: BoxDecoration(
                                  borderRadius: BorderRadius.only(
                                    topLeft: Radius.circular(0),
                                    topRight: Radius.circular(15),
                                    bottomLeft: Radius.circular(0),
                                    bottomRight: Radius.circular(15),
                                  ),
                                  color: Color.fromRGBO(255, 255, 255, 1),
                                  // border: Border(
                                  //   top: BorderSide(width: 3.0, color: Colors.white),
                                  //   left: BorderSide(width: 0.0, color: Colors.white),
                                  //   right: BorderSide(width: 3.0, color: Colors.white),
                                  //   bottom: BorderSide(width: 3.0, color: Colors.white),
                                  // ),
                                ),
                                child: Column(
                                  mainAxisAlignment: MainAxisAlignment.center,
                                  children: [
                                    Container(
                                      width: 100,
                                      height: 20,
                                      //color: Colors.orange,
                                      child: Row(
                                        mainAxisAlignment:
                                            MainAxisAlignment.center,
                                        children: [
                                          Container(
                                            width: 16,
                                            height: 16,
                                            decoration: BoxDecoration(
                                                color: Color.fromRGBO(
                                                    227, 248, 242, 1),
                                                borderRadius:
                                                    BorderRadius.circular(16)),
                                            child: Padding(
                                              padding: EdgeInsets.all(3),
                                              child: Container(
                                                width: 10,
                                                height: 10,
                                                child: Image.asset(
                                                  "lib/assets/ykm/success2.png",
                                                ),
                                              ),
                                            ),
                                          ),
                                          Text(" 新冠疫苗 >")
                                        ],
                                      ),
                                    ),
                                    Container(
                                      alignment: Alignment.center,
                                      height: 60,
                                      child: Text(
                                        "已完成全程接种 ",
                                        style: TextStyle(
                                            fontSize: 20,
                                            fontWeight: FontWeight.w600,
                                            color: Colors.green),
                                      ),
                                    ),
                                    Text(
                                      "2021-12-01",
                                      style: TextStyle(fontSize: 13),
                                    )
                                  ],
                                ),
                              ),
                            ],
                          ),
                        ),
                      ),

                      Positioned(
                        top: 600,
                        child: Padding(
                          padding: EdgeInsets.only(left: 20, right: 10),
                          child: Container(
                            width: MediaQuery.of(context).size.width,
                            height: 100,
                            //color: Colors.orange,
                            child: Padding(
                              padding: EdgeInsets.only(right: 40),
                              child: Container(
                                width: MediaQuery.of(context).size.width,
                                height: 100,
                                child: Image.asset("lib/assets/ykm/img1.png"),
                              ),
                            ),
                          ),
                        ),
                      ),
                      //Positioned(top: 700,child: Container(width: MediaQuery.of(context).size.width,height: 90,color: Colors.blue,),),
                      Positioned(
                        top: 680,
                        child: Padding(
                          padding: EdgeInsets.only(left: 20, right: 10),
                          child: Container(
                            width: MediaQuery.of(context).size.width,
                            height: 100,
                            //color: Colors.orange,
                            child: Padding(
                              padding: EdgeInsets.only(right: 40),
                              child: Container(
                                width: MediaQuery.of(context).size.width,
                                height: 100,
                                child: Image.asset("lib/assets/ykm/img2.png"),
                              ),
                            ),
                          ),
                        ),
                      ),
                      Positioned(
                        top: 770,
                        child: Container(
                          alignment: Alignment.center,
                          width: MediaQuery.of(context).size.width,
                          height: 70,
                          child: Text("Flutter version: V0.2.4"),
                        ),
                      ),
                    ],
                  ),
                ),
              ],
            ),
            Positioned(
              right: 10,
              top: 45,
              child: Container(
                width: 79,
                height: 30,
                decoration: BoxDecoration(
                    color: Color.fromRGBO(43, 43, 43, 0.1),
                    borderRadius: BorderRadius.circular(14)),
                child: Row(
                  mainAxisAlignment: MainAxisAlignment.center,
                  children: [
                    Container(
                      width: 20,
                      height: 20,
                      child: Image.asset("lib/assets/ykm/gd.png"),
                    ),
                    Container(
                      width: 15,
                    ),
                    Container(
                      width: 20,
                      height: 20,
                      child: Image.asset("lib/assets/ykm/yd.png"),
                    ),
                  ],
                ),
              ),
            ),
          ],
        ),
      ),
    );
  }
}

class YmDialog extends Dialog {
  final String title;

  const YmDialog(this.title, {Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Center(
      //创建透明层
      child: Material(
        type: MaterialType.transparency, //透明类型
        child: SizedBox(
          width: 120,
          height: 120,
          child: Container(
            // decoration: ShapeDecoration(
            //   color: Colors.grey,
            //   shape: const RoundedRectangleBorder(
            //     borderRadius: BorderRadius.all(
            //       Radius.circular(5.0),
            //     ),
            //   ),
            // ),
            child: Column(
              mainAxisAlignment: MainAxisAlignment.center,
              crossAxisAlignment: CrossAxisAlignment.center,
              children: <Widget>[
                const CircularProgressIndicator(
                  color: Colors.white,
                ),
                Padding(
                  padding: const EdgeInsets.only(top: 14),
                  child: Text(
                    title,
                    style: const TextStyle(fontSize: 14.0, color: Colors.white),
                  ),
                ),
              ],
            ),
          ),
        ),
      ),
    );
  }
}

class BottomPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Container(
      height: 70,
      width: MediaQuery.of(context).size.width,
      color: Color.fromRGBO(249, 249, 249, 1),
      child: Row(
        mainAxisAlignment: MainAxisAlignment.center,
        children: [
          Container(
            width: 120,
            height: 50,
            child: Column(
              mainAxisAlignment: MainAxisAlignment.spaceAround,
              children: [Text("一证通来了!"), Text("立即点击进入")],
            ),
          ),
          Container(
            width: 200,
            height: 50,
            decoration: BoxDecoration(
                color: Colors.black, borderRadius: BorderRadius.circular(5)),
            child: Column(
              mainAxisAlignment: MainAxisAlignment.spaceAround,
              children: [
                Text(
                  "全国移动电话卡 " + "一证通查" + " ",
                  style: TextStyle(color: Colors.white),
                ),
                Text(
                  "防范诈骗,保护你我",
                  style: TextStyle(color: Colors.grey),
                )
              ],
            ),
          ),
        ],
      ),
    );
  }
}
